package com.example.app.util;

import java.util.HashMap;
import java.util.Map;

/**
 * 描述:
 *
 * @author chenconghua
 * @version 1.0
 * @create 2022-11-04 12:14
 */
public class AuthUtil {
    public static Map<String,String> GetAuth(){
        Long timstamp=System.currentTimeMillis();
        Map<String,String> map = new HashMap<>();
        map.put(AuthConstants.APP_ID,"56");
        map.put(AuthConstants.APP_KEY,"426df59c-6e95-4b0c-8564-03dbbbeb7bf3");
        map.put(AuthConstants.TIME_STAMP,String.valueOf(timstamp));
        try {
            map.put(AuthConstants.TOKEN, MD5Util.encrypt(ApiRequest.buildApiRequest(map).toString()));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return map;
    }
}
